<template>
  <div class="hello">

    <button @click="userFetch" >open</button>
    <span>
        {{getMessage}}
    </span>
  </div>
</template>

<script>
import { mapGetters, mapActions } from 'vuex'

export default {
  computed:
    mapGetters([
      'getMessage'
    ])
  ,
  methods: mapActions([
    'userFetch'
  ]),
//   created () { // 默认发送
//     this.$store.dispatch('userFetch')
//   }
}

</script>
